package com.chb.controller;


import com.chb.entities.CommonResult;
import com.chb.entities.Payment;
import com.chb.service.PaykmentFeignService;
import com.netflix.discovery.converters.Auto;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

@RestController
@Slf4j
public class OrderFeignController {

    @Autowired
    private PaykmentFeignService paykmentFeignService;



    @GetMapping("/consumer/paymet/get/{id}")
    public CommonResult<Payment> get(@PathVariable("id")Long id){

        return paykmentFeignService.getPaymetnById(id);

    }

    @GetMapping("/consumer/payment/feign/timeout")
    public String gettimeout(){

        //
        return paykmentFeignService.getPaymentFeignTimeOut();

    }





}
